<?php
namespace Api\Controller;
use Think\Controller\RestController;
class BaseRestController extends RestController {

    protected function _initialize() {

    }

    public function response404Json() {
        $data['status']  = 404;
        $data['message'] = '404 not found!';
        $this->response($data, 'json');
    }

    public function responseSuccessJson() {
        $data['status']  = 200;
        $data['message'] = 'success!';
        $this->response($data, 'json');
    }

    public function responseDataJson($datas) {
        $data['status']  = 200;
        $data['message'] = 'success!';
        $data['data'] = $datas;
        $this->response($data, 'json');
    }

    public function _empty() {
        $this->response404Json();
    }

}